package DesignPattern.singleton;
/**
 * 懒汉模式
 * @author Administrator
 *
 */
public class singletonDemo {
	private static singletonDemo instance;
	private singletonDemo() {
		
	}
	public static singletonDemo getInstance() {
		if(instance==null) {
			instance=new singletonDemo();
		}
		return instance;
	}
}
